home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: chang.unx.sas.com!walker
- From: walker@chang.unx.sas.com (Doug Walker)
- Subject: Re: File sizes
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <Do2vs9.HGu@unx.sas.com>
- Date: Mon, 11 Mar 1996 00:52:57 GMT
- X-Nntp-Posting-Host: chang.unx.sas.com
- References: <4gjs20$i68@btmpjg.god.bel.alcatel.be> <642.6631T1174T964@stud.cs.uit.no> <gertjan.0ay2@a1200.iaehv.nl>
- Organization: SAS Institute Inc.
-
- In article <gertjan.0ay2@a1200.iaehv.nl>,
- Gertjan van Ratingen <gertjan@a1200.iaehv.nl> wrote:
- >
- >In article <642.6631T1174T964@stud.cs.uit.no> magneoe@stud.cs.uit.no (Magne Oestlyngen) writes:
- >> >In article <WXQ7y*5+f@yaps.rhein.de>, arno@yaps.rhein.de (Arno Eigenwillig) writes:
- >> >|> > What's the best way of finding out the size of a file? Do I have to use
- >> >|> > Examine()
- >> >..or do it in ANSI-C, by opening the file, seeking to the end of it
- >> >and getting the number of bytes returned from fseek().
- >>
- >> fseek() does not return the number of bytes, but 0 if all went fine, non-0 else.
- >> Use ftell() to get the position in the file after fseek().
-
- Technically, ftell() is only guaranteed accurate if the file was opened in the
- binary mode. ftell() may not be the actual byte count for text files. In most
- (if not all) Amiga implementations, they are identical, but the ANSI standard
- allows them to be different.
-
- --
- *****
- *|_o_o|\\ Doug Walker walker@unx.sas.com
- *|. o.| ||
- | o |// Any opinions are mine, not those of SAS Institute, Inc.
- ======
-